import json

from config import BASE_DIR


def build_data(filename):
    with open(BASE_DIR + f"/data/{filename}.json", encoding='utf-8') as f:
        data = json.load(f)  # data [{}, {}]
    new_list = []
    for d in data:  # d 字典
        d.pop("desc")
        new_list.append(tuple(d.values()))

    return new_list


if __name__ == '__main__':
    # print(build_data('login_data'))
    print(build_data('emp_add_data'))